package com.pliu.sqlSession;

import java.util.List;

/**
 * @ClassName SqlSession
 * @Description
 * @Author pliu
 * @Date 2020/6/21 16:05
 * @Version 1.0
 **/
public interface SqlSession {
    /**
     * 查询所有
     */
    public <E> List<E> selectList(String statementId,Object... params) throws Exception;
    /**
     * 查询单个
     */
    public <T> T selectOne(String statementId,Object... params) throws Exception;

    /**
     * 增删改
     */
    public int update(String statementId, Object... params) throws Exception;

    /**
     * 生成代理对象
     * @param mapperClass
     * @param <T>
     * @return
     */
    public <T> T getMapper(Class<?> mapperClass);
}
